import time
a=open('/home/student/Рабочий стол/Новая папка/m1_sorted.txt')
b=a.readlines()
b=list(map(int,b))
start_time=time.time()
for i in range(len(b)-1):
    for j in range(i+1,len(b)):
        if b[i]>b[j]:
            c=b[i]
            b[i]=b[j]
            b[j]=c
end_time = time.time()

print(round(end_time - start_time)*1000)

a=open('/home/student/Рабочий стол/Новая папка/m2_reverse.txt')
d=a.readlines()
b=list(map(int,b))
start_time=time.time()
for i in range(len(b)-1):
    for j in range(i+1,len(b)):
        if b[i]>b[j]:
            c=b[i]
            b[i]=b[j]
            b[j]=c
end_time = time.time()

print(round(end_time - start_time)*1000)

a=open('/home/student/Рабочий стол/Новая папка/m3_shuffle.txt')
d=a.readlines()
b=list(map(int,b))
import time
for i in range(len(b)-1):
    for j in range(i+1,len(b)):
        if b[i]>b[j]:
            c=b[i]
            b[i]=b[j]
            b[j]=c
end_time = time.time()

print(round(end_time - start_time)*1000)
